package com.joysuch.wwyt.mh.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.joysuch.wwyt.core.exception.ApiBusinessException;
import com.joysuch.wwyt.mh.bean.CustomizeMonitorPointDataBean;
import com.joysuch.wwyt.mh.bean.CustomizeMonitorPointSearchBean;
import com.joysuch.wwyt.mh.bean.MhMonitoringPointReqBean;
import com.joysuch.wwyt.mh.dto.CustomizeMonitorLocationInfoDto;
import com.joysuch.wwyt.mh.dto.CustomizeMonitorPointDto;
import com.joysuch.wwyt.mh.dto.CustomizeMonitorTypeUseCountDto;
import com.joysuch.wwyt.mh.entity.CustomizeMonitorPoint;
import com.baomidou.mybatisplus.extension.service.IService;
import com.joysuch.wwyt.mh.entity.CustomizeMonitorType;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author jingwk
 * @since 2021-07-05
 */
public interface CustomizeMonitorPointService extends IService<CustomizeMonitorPoint> {

    /**
     * 自定义监测点列表
     * @param searchBean
     * @return
     */
    IPage<CustomizeMonitorPointDto> findListPaging(CustomizeMonitorPointSearchBean searchBean);

    /**
     * 自定义检测点统计
     * @return
     */
    List<CustomizeMonitorTypeUseCountDto> countPointByType();

    /**
     * 自定义检测点数据推送
     * @param data
     * @return
     * @throws ApiBusinessException
     */
    boolean pushMonitorPoint(CustomizeMonitorPointDataBean data) throws ApiBusinessException;

    /**
     * 获取location 信息
     * @return
     */
    List<CustomizeMonitorLocationInfoDto> getLocationInfo();

    /**
     * 获取监测点类型通过id
     * @param pointId
     * @return
     */
    CustomizeMonitorType getPointTypeInfoById(Long pointId);

    /**
     * 获取监测点详情
     * @param pointId
     * @return
     */
    Object monitorPointDetail(Long pointId) throws ApiBusinessException;

    /**
     * 手动推送数据到socket
     */
    void pushMonitorPoint();

    /**
     * 监测点批量开关
     * @param bean
     */
    void batchSwitch(MhMonitoringPointReqBean bean);
}
